<div class="expense">
  <p><strong>Description:</strong> <%=h expense.description %></p>
  <p><strong>Amount:</strong> <%=h expense.amount %></p>
  <p><strong>Location:</strong> <%=h expense.location %></p>
  <p><strong>Date:</strong> <%=h expense.created_at %></p>
  <p><strong>Note:</strong> <%=h expense.note %></p>
  <p><strong>Categories:</strong> <% expense.categories.each do |category| %><%=h category.name %> <% end %></p>

  <div class="expense-links">
    <h3>Operations</h3>
    <ul style="list-style: none;">
      <li><%= link_to 'Edit', edit_expense_path(expense) %></li>
      <li><%= link_to 'Destroy', expense, :confirm => 'Are you sure?', :method => :delete %></li>
    </ul>

    <h3>Links</h3>
    <ul style="list-style: none;">
      <li><%= link_to 'Home', :controller => "welcome", :action => "home" %></li>
      <li><%= link_to 'Expenses [by Category]', :controller => "expenses", :action => "by_category" %></li>
      <li><%= link_to 'Expenses [by Date]', :controller => "expenses", :action => "by_date" %></li>
    </ul>
  </div>
</div>
